package com.bgIntlgn.client.entity.manufacture;

import yuhuibear.poat.annotations.action.AutoGenerateValue;
import yuhuibear.poat.annotations.relation.Field;
import yuhuibear.poat.annotations.relation.Table;

/**
 * 加工失败记录.
 * @author yuhui
 *
 */
@Table(name = "fail_produces", constrain = "")
public class FailProduce {

	@AutoGenerateValue(skipOnNull = true, sqlToGet = "select currval('production_plans_id_seq')")
	@Field(name = "id", type = "bigserial", constrain = "primary key ")
	private Long id;
	
	/**
	 * 对应的工艺生产记录
	 */
	@Field(name = "work_record_id", type = "int8 ", constrain = " not null references work_recods(id)  on update cascade on delete cascade")
	private Long workRecodId;
	
	/**
	 * 报损的数量
	 */
	@Field(name = "broken", type = "int", constrain = "default 0")
	private Integer broken;
	
	/**
	 * 已补上的数量.
	 * 派工时检查ProductionIterm, 如果有加工失败记录， 则更新对应的这个字段。
	 */
	@Field(name = "filled", type = "int", constrain = "default 0")
	private Integer filled;

	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getWorkRecodId() {
		return this.workRecodId;
	}

	public void setWorkRecodId(Long workRecodId) {
		this.workRecodId = workRecodId;
	}

	public Integer getBroken() {
		return this.broken;
	}

	public void setBroken(Integer broken) {
		this.broken = broken;
	}

	public Integer getFilled() {
		return this.filled;
	}

	public void setFilled(Integer filled) {
		this.filled = filled;
	}
	
	
}
